jas.hist
Class Fittable1DFunction
java.lang.Object
|
+--java.util.Observable
|
+--jas.hist.Basic1DFunction
|
+--jas.hist.Fittable1DFunction
- All Implemented Interfaces:
- DataSource, ExtendedStatistics, FunctionData, HasStatistics, java.io.Serializable, Statistics
- public abstract class Fittable1DFunction
- extends Basic1DFunction
- implements ExtendedStatistics
- See Also:
- Serialized Form
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Fittable1DFunction
public Fittable1DFunction()
valueAt
public abstract double valueAt(double x,
double[] param)
throws FunctionValueUndefined
setFit
public abstract void setFit(Fitter fit,
double[] param)
throws InvalidFunctionParameter
getIncludeParametersInFit
public boolean[] getIncludeParametersInFit()
clearFitParams
public void clearFitParams()
setIncludeParameterInFit
public void setIncludeParameterInFit(int index,
boolean value)
initIncludeParametersInFit
protected void initIncludeParametersInFit(int nParameters)
getDerivatives
public double[] getDerivatives(double x,
double[] a)
throws FunctionValueUndefined
- Calculates the partial derivative of the function with respect to each parameter
at point x. This is a non-analytical calculation which can be overriden by subclasses
which wish to provide an analytical calculation
- Throws:
FunctionValueUndefined
- if the function is not defined for x
getFit
public Fitter getFit()
setFit
protected void setFit(Fitter fit)
clearFit
public void clearFit()
destroy
protected void destroy()
- Overrides:
destroy
in class Basic1DFunction
getStatisticNames
public java.lang.String[] getStatisticNames()
- Specified by:
getStatisticNames
in interface Statistics
- Overrides:
getStatisticNames
in class Basic1DFunction
- Following copied from interface:
jas.hist.Statistics
- Returns:
- A list of statistic names
getStatistic
public double getStatistic(java.lang.String name)
- Specified by:
getStatistic
in interface Statistics
- Overrides:
getStatistic
in class Basic1DFunction
- Following copied from interface:
jas.hist.Statistics
- Parameters:
The
- statistic name, as returned by getStatisticNames()- Returns:
- The value for the statistic
getExtendedStatistic
public java.lang.Object getExtendedStatistic(java.lang.String name)
- Description copied from interface:
ExtendedStatistics
- Returns an object corresponding to the named statistic.
In general the statistic will be displayed by calling
its toString method, however if a Format object has been
defined for this class (how?) then it will be used instead.
By default the following formatters are defined
- java.lang.Double
- jas.util.ScientificFormat
- jas.util.DoubleWithError
- jas.util.ScientificFormat
If the method returns null, then the getStatistic() method from
the subclass will be called instead. This simplifies the use of
simple floating point statistics (no need to create a Double
object for each one).
- Specified by:
getExtendedStatistic
in interface ExtendedStatistics
- Following copied from interface:
jas.hist.ExtendedStatistics
- Parameters:
name
- The name of the statistic to return- See Also:
ScientificFormat
,
DoubleWithError